package com.mdb.open.trade.config;

import com.mdb.bc.cache.sequence.util.SequenceEnum;
import com.mdb.bc.utils.ExpireTypeEnum;

/**
 * @author liuyi
 * @date 2019/07/20
 **/
public enum LimitUseSeqEnum implements SequenceEnum {

    /**
     * 商户额度使用流水号3位前缀
     */
    ME_LIMIT_USE_SEQ("MEU", "商户额度使用流水号"),
    /**
     * 客户额度使用流水号前缀
     */
    CU_LIMIT_USE_SEQ("CUU", "客户额度使用流水号"),

    ;

    private String prefix;
    private String text;

    LimitUseSeqEnum(String prefix, String text) {
        this.prefix = prefix;
        this.text = text;
    }

    /**
     * 默认前缀开始
     */
    @Override
    public String getDefaultPrefixStart() {
        return this.prefix;
    }


    @Override
    public ExpireTypeEnum getExpireType() {
        return ExpireTypeEnum.DAY;
    }

    @Override
    public String getSystemKey() {
        return "cnt-product";
    }

    @Override
    public String getBusinessKey() {
        return this.name();
    }

}